package com.eastchina.fw.database.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface QueryDAO {

	public static final HashMap<String, String> EMPTY_PARAMS = new HashMap<String, String>();
	
    @SuppressWarnings("unchecked")
	public <E> E executeForObject(String sqlID, Object bindParams, Class clazz);

    public Map<String, Object> executeForMap(String sqlID, Object bindParams);

    @SuppressWarnings("unchecked")
	public <E> E[] executeForObjectArray(String sqlID,
            Object bindParams, Class clazz);

    public Map<String, Object>[] executeForMapArray(String sqlID,
            Object bindParams);

    @SuppressWarnings("unchecked")
	public <E> E[] executeForObjectArray(String sqlID,
            Object bindParams, Class clazz, int beginIndex, int maxCount);

    public Map<String, Object>[] executeForMapArray(String sqlID,
            Object bindParams, int beginIndex, int maxCount);

    public <E> List<E> executeForObjectList(String sqlID,
            Object bindParams);

    public List<Map<String, Object>> executeForMapList(String sqlID,
            Object bindParams);

    public <E> List<E> executeForObjectList(String sqlID,
            Object bindParams, int beginIndex, int maxCount);

    public List<Map<String, Object>> executeForMapList(String sqlID,
            Object bindParams, int beginIndex, int maxCount);
}
